//  菜单收缩时element会给菜单添加el-menu--collapse类，这时候把文字和下拉图标隐藏掉即可,
/* element-ui 的<el-menu>标签本身希望里面嵌套的是<el-menu-item>,<el-submenu>,<el-menu-item-group>之一，但是却嵌套了其他标签,而导致收折就隐藏不了文字。*/
.el-menu--collapse .el-submenu__title span {
  height: 0;
  width: 0;
  overflow: hidden;
  visibility: hidden;
  display: inline-block;
}

.el-menu--collapse .el-submenu__icon-arrow {
  display: none;
}

//没有排除el-menu--collapse类会没有动画,el-menu--collapse这里设置收缩后的宽度,默认64
.eve-menu:not(.el-menu--collapse) {
  width: 100%;
}

.eve-menu__menu-item {
  .el-submenu__title:focus,
  .el-submenu__title:hover {
    background: #f0f3f6 !important;
    border-right: 3px solid $--color-primary;
    color: $--color-primary;
  }

  /*里面最底层孩子项的颜色 */
  .el-menu-item:focus,
  .el-menu-item:hover {
    background: #f0f3f6 !important;
    border-right: 3px solid $--color-primary;
    color: $--color-primary;
  }

  .el-menu-item.is-active {
    background: #f0f3f6 !important;
    border-right: 3px solid $--color-primary;
    color: $--color-primary;
  }

  .el-submenu__title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .el-menu-item {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/*加快收缩的动画 */
.collapse-transition {
  transition: 0.2s height, 0.1s padding-top, 0.1s padding-bottom;
}

.horizontal-collapse-transition {
  transition: 0s width, 0s padding-left, 0s padding-right;
}

.horizontal-collapse-transition .el-submenu__title .el-submenu__icon-arrow {
  -webkit-transition: 0s;
  transition: 0s;
  opacity: 0;
}

.el-submenu .el-menu-item {
  min-width: 0;
  width: 100%;
}

.eve-menu__item-border-right-none .eve-menu__menu-item .el-menu-item {
  border-right: none;
}

.eve-menu__item-border-right-none .eve-menu__menu-item {
  .el-submenu__title:focus,
  .el-submenu__title:hover {
    border-right: none;
  }
}

//菜单的高度、调整
.eve-menu {
  .el-submenu__title {
    height: 40px;
    line-height: 40px;
  }

  .el-menu-item {
    height: 40px;
    line-height: 40px;
  }
}

.eve-menu__main {
  border-right: solid 1px #e6e6e6;

  &.eve-menu__border-right-none {
    border-right: solid 1px transparent;
  }
}

//让弹出框的距离更靠近些
.el-menu--popup-bottom-start {
  margin-top: -13px !important;
}

// .eve-menu-item__title,
// .eve-menu-item__item {
//   display: flex;
//   align-items: center;
//   justify-content: flex-start;
// }

// .el-menu--collapse {
//   .eve-menu-item__title,
//   .eve-menu-item__item {
//     display: block;
//   }
// }
